package com.rgz.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.rgz.pojo.Bookinfo;
import com.rgz.service.BookInfoService;

@Controller
public class BookTest {
     @Autowired
     private BookInfoService bookInfoService;
	
	
	
	 @RequestMapping("/test1")
	 public String test01(Model model){
		 Bookinfo bookinfo = bookInfoService.selectByPrimaryKey(3);
		 System.out.println("11");
		 model.addAttribute(bookinfo);
		 return "index";
	 }
	
	
}
